<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=7" />
	<title>“半价汇”广告管理系统</title>
	<!-- Reset Stylesheet -->
	<link rel="stylesheet" href="static/css/reset.css" type="text/css" media="screen" />
  
	<!-- Main Stylesheet -->
	<link rel="stylesheet" href="static/css/style.css" type="text/css" media="screen" />
	
	<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
	<link rel="stylesheet" href="static/css/invalid.css" type="text/css" media="screen" />	
	<link rel="stylesheet" type="text/css" media="screen" href="static/css//datePicker.css">

	<script type="text/javascript" src="static/js/jquery.min.js"></script>
	<!-- jQuery Configuration -->
	<script type="text/javascript" src="static/js/simpla.jquery.configuration.js"></script>

	<script type="text/javascript" src="static/js/date.js"></script>
	<script type="text/javascript" src="static/js/jquery.datePicker.js"></script>

	<script type="text/javascript" src="static/js/jquery.metadata.js"></script>
	<script type="text/javascript" src="static/js/jquery.validate.min.js"></script>
	<!-- 自定义js函数 -->
	<script type="text/javascript" src="static/js/common.js"></script>
</head>
<style>
/* located in demo.css and creates a little calendar icon
 * instead of a text link for "Choose date"
 */
a.dp-choose-date {
	float: left;
	width: 16px;
	height: 16px;
	padding: 0;
	margin: 5px 3px 0;
	display: block;
	text-indent: -2000px;
	overflow: hidden;
	background: url(static/images/calendar.png) no-repeat; 
}
a.dp-choose-date.dp-disabled {
	background-position: 0 -20px;
	cursor: default;
}
/* makes the input field shorter once the date picker code
 * has run (to allow space for the calendar icon
 */
input.dp-applied {
	width: 140px;
	float: left;
}

#screenshot{
	position:absolute;
	border:1px solid #ccc;
	background:#333;
	padding:5px;
	display:none;
	color:#fff;
}
</style>
<body>
	<div id="body-wrapper">
		<?php include 'admin_sidebar.html'; ?>
		<div id="main-content">
			<div class="content-box">
				<div class="content-box-header">
					<h3>审核广告 - 选择店铺</h3>
					<div class="clear"></div>
				</div>
				<div class="content-box-content">
				<form action="<?php echo spUrl('youhui_signup', 'verify');?>" method="get" id="productform">
				<input type="hidden" name="step" name="step" value="1">
				<input type="hidden" name="store_id" name="store_id" id="store_id" value="0">
				<input type="hidden" name="ysid" value="<?php echo $ysid; ?>" />
				<input type="hidden" name="a" value="<?php echo $a;?>" />
				<input type="hidden" name="c" value="<?php echo $c;?>" />
				<fieldset>
				<p>
					<label>用户输入店铺名称：</label>
					<?php echo $result['store_name'];?>
				</p>
				<p>
					<label>店铺ID：</label>
					<span id="store_id_html"></span>
				</p>
				<p>
					<label>店铺名称：</label>
					<input class="text-input medium-input" type="text" id="store_name" name="store_name" value="<?php echo $result['store_name'];?>"/><a href="javascript:void(0);" id="checkstore">检测是否存在</a>&nbsp;&nbsp;<a href="<?php echo spUrl('store', 'add'); ?>" target="_blank">添加店铺</a>
					<br /><small>不能为空</small>
				</p>
				<p>
					<input type="submit" id="dosubmit" value="确定" class="button" style="width: 105px;" /> <input type="reset" style="width: 45px;" class="button">
				</p>
				</fieldset>
				</form>
				</div>
				<div class="content-box-content">
				1、请先点击“检测店铺是否存在”。<br />
				2、当店铺ID显示正常店铺数字时，则点击“确定”，提交

				</div>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
$().ready(function() {
	$('#checkstore').click(function(){
		$.get("<?php echo spUrl('youhui_signup', 'store_check');?>", {store_name:$('#store_name').val()}, function(data){
			if(data > 0) {
				$('#store_id_html').html(data);
				$('#store_id').val(data);
				alert('店铺存在，请点击确定，确认提交信息');
			} else if(data == '-1') {
				alert('店铺不存在请添加店铺');
				return false;
			}
		});
	})
});
</script>
</html>